<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32 HTTPS Server: httpsserver::HTTPResponse Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32 HTTPS Server
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classhttpsserver_1_1HTTPResponse.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classhttpsserver_1_1HTTPResponse-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">httpsserver::HTTPResponse Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents the response stream of an HTTP request.  
 <a href="classhttpsserver_1_1HTTPResponse.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="HTTPResponse_8hpp_source.html">HTTPResponse.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for httpsserver::HTTPResponse:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPResponse__inherit__graph.png" border="0" usemap="#httpsserver_1_1HTTPResponse_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for httpsserver::HTTPResponse:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPResponse__coll__graph.png" border="0" usemap="#httpsserver_1_1HTTPResponse_coll__map" alt="Collaboration graph"/></div>
<map name="httpsserver_1_1HTTPResponse_coll__map" id="httpsserver_1_1HTTPResponse_coll__map">
<area shape="rect" id="node3" href="classhttpsserver_1_1ConnectionContext.html" title="Internal class to handle the state of a connection. " alt="" coords="101,95,307,121"/>
<area shape="rect" id="node4" href="classhttpsserver_1_1WebsocketHandler.html" title="httpsserver::WebsocketHandler" alt="" coords="101,5,307,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a703607587865c03f733c5780de4ee8c2"><td class="memItemLeft" align="right" valign="top"><a id="a703607587865c03f733c5780de4ee8c2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPResponse</b> (<a class="el" href="classhttpsserver_1_1ConnectionContext.html">ConnectionContext</a> *con)</td></tr>
<tr class="separator:a703607587865c03f733c5780de4ee8c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f2d639595f353140b316bc8b2ac0a0e"><td class="memItemLeft" align="right" valign="top"><a id="a7f2d639595f353140b316bc8b2ac0a0e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setStatusCode</b> (uint16_t statusCode)</td></tr>
<tr class="separator:a7f2d639595f353140b316bc8b2ac0a0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a448f0adbf38391379d993707bfac50e0"><td class="memItemLeft" align="right" valign="top"><a id="a448f0adbf38391379d993707bfac50e0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setStatusText</b> (std::string const &amp;statusText)</td></tr>
<tr class="separator:a448f0adbf38391379d993707bfac50e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdf0a0a58a4060299e96417b733be401"><td class="memItemLeft" align="right" valign="top"><a id="afdf0a0a58a4060299e96417b733be401"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>getStatusCode</b> ()</td></tr>
<tr class="separator:afdf0a0a58a4060299e96417b733be401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e26c0d0793af60f1810aa920618e0a5"><td class="memItemLeft" align="right" valign="top"><a id="a8e26c0d0793af60f1810aa920618e0a5"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getStatusText</b> ()</td></tr>
<tr class="separator:a8e26c0d0793af60f1810aa920618e0a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d91c7b497e378246f36c63b8105ef82"><td class="memItemLeft" align="right" valign="top"><a id="a1d91c7b497e378246f36c63b8105ef82"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setHeader</b> (std::string const &amp;name, std::string const &amp;value)</td></tr>
<tr class="separator:a1d91c7b497e378246f36c63b8105ef82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d496fbd36c3536fd05ffc59cda73af9"><td class="memItemLeft" align="right" valign="top"><a id="a5d496fbd36c3536fd05ffc59cda73af9"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getHeader</b> (std::string const &amp;name)</td></tr>
<tr class="separator:a5d496fbd36c3536fd05ffc59cda73af9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15665edae450ea289767ae9d1bbfcce7"><td class="memItemLeft" align="right" valign="top"><a id="a15665edae450ea289767ae9d1bbfcce7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isHeaderWritten</b> ()</td></tr>
<tr class="separator:a15665edae450ea289767ae9d1bbfcce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae49e169deefa0daff8857afc1a4ccad0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPResponse.html#ae49e169deefa0daff8857afc1a4ccad0">printStd</a> (std::string const &amp;str)</td></tr>
<tr class="separator:ae49e169deefa0daff8857afc1a4ccad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab288aeefca5b314bf9315c1d41143cf4"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPResponse.html#ab288aeefca5b314bf9315c1d41143cf4">write</a> (const uint8_t *buffer, size_t size)</td></tr>
<tr class="separator:ab288aeefca5b314bf9315c1d41143cf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada927bfdc804ed7b37a53239375aaad8"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPResponse.html#ada927bfdc804ed7b37a53239375aaad8">write</a> (uint8_t)</td></tr>
<tr class="separator:ada927bfdc804ed7b37a53239375aaad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addc79f94dc1cf6eda245a15cb62ccb27"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPResponse.html#addc79f94dc1cf6eda245a15cb62ccb27">error</a> ()</td></tr>
<tr class="separator:addc79f94dc1cf6eda245a15cb62ccb27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebc852a43e80d9cec2a707eb8accfa59"><td class="memItemLeft" align="right" valign="top"><a id="aebc852a43e80d9cec2a707eb8accfa59"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isResponseBuffered</b> ()</td></tr>
<tr class="separator:aebc852a43e80d9cec2a707eb8accfa59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a51ee9a26bb3859e2c94caefd179133"><td class="memItemLeft" align="right" valign="top"><a id="a1a51ee9a26bb3859e2c94caefd179133"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>finalize</b> ()</td></tr>
<tr class="separator:a1a51ee9a26bb3859e2c94caefd179133"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a8ee9aaeea72f7925aef3de46740fe669"><td class="memItemLeft" align="right" valign="top"><a id="a8ee9aaeea72f7925aef3de46740fe669"></a>
<a class="el" href="classhttpsserver_1_1ConnectionContext.html">ConnectionContext</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>_con</b></td></tr>
<tr class="separator:a8ee9aaeea72f7925aef3de46740fe669"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents the response stream of an HTTP request. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="addc79f94dc1cf6eda245a15cb62ccb27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addc79f94dc1cf6eda245a15cb62ccb27">&#9670;&nbsp;</a></span>error()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpsserver::HTTPResponse::error </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This method can be called to cancel the ongoing transmission and send the error page (if possible) </p>

</div>
</div>
<a id="ae49e169deefa0daff8857afc1a4ccad0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae49e169deefa0daff8857afc1a4ccad0">&#9670;&nbsp;</a></span>printStd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpsserver::HTTPResponse::printStd </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes a string to the response. May be called several times. </p>

</div>
</div>
<a id="ab288aeefca5b314bf9315c1d41143cf4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab288aeefca5b314bf9315c1d41143cf4">&#9670;&nbsp;</a></span>write() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t httpsserver::HTTPResponse::write </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes bytes to the response. May be called several times. </p>

</div>
</div>
<a id="ada927bfdc804ed7b37a53239375aaad8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada927bfdc804ed7b37a53239375aaad8">&#9670;&nbsp;</a></span>write() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t httpsserver::HTTPResponse::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>b</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes a single byte to the response. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/<a class="el" href="HTTPResponse_8hpp_source.html">HTTPResponse.hpp</a></li>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/HTTPResponse.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li><li class="navelem"><a class="el" href="classhttpsserver_1_1HTTPResponse.html">HTTPResponse</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
